1. Field of the Invention
This invention relates to a network synchronization system and a network synchronization method for establishing synchronism of a communication network which employs a bus of the IEEE 1394 standard.
2. Description of the Related Art
The IEEE 1394 standard (hereinafter referred to as 1394) which is a high performance serial bus standard prescribes an isochronous transfer mode which secures a transfer band of a packet. The isochronous transfer mode is realized by introducing a concept of a cycle having a nominal cycle frequency of 8 kHz and a procedure of acquiring in advance a time within which a packet can be transferred for each cycle.
A detailed method prescribed in the IEEE 1394 standard in order to managing cycles is described with reference to FIG. 1. Referring to FIG. 1, the start of a cycle is recognized by detecting a cycle start packet broadcast in the bus. The cycle start packet is transmitted from one node called cycle master set for the bus. The cycle master includes a CYCLE—TIME register for storing the time and keeps the period for transmission of a cycle start packet fixed using the CYCLE—TIME register.
The format of the CYCLE—TIME register prescribed in the IEEE 1394 standard is illustrated in FIG. 2. Referring to FIG. 2, the CYCLE—TIME register is a 32-bit register, wherein the higher order 7 bits are called second—count field, the following 13 bits are called cycle—count field and the lower order 12 bits are called cycle—offset field. The cycle—offset field forms a counter which increments with a clock of a nominal frequency of 24.576 megahertz, and returns its count value to 0 after it comes to 3,071 (decimal number). In other words, the cycle—offset field is a counter whose count value returns to 0 after each 125 microseconds as a period of a cycle. The following cycle—count field forms a counter which increments by one at a timing at which the cycle—offset returns to 0 and counts the number of cycles. The cycle—count field returns to 0 after the count value thereof comes to 7,999 in decimal number. In other words, the cycle—count is a counter whose count value returns to 0 after each one second. The second—count field in the highest order is a counter which increments by one at a timing at which the cycle—count returns to 0, and counts seconds. The second—count field returns to 0 after the count value thereof comes to 127 in decimal number.
The cycle master tries to transmit a cycle start packet at a timing at which the cycle—count field of the CYCLE—TIME register thereof is incremented. If there is no packet being currently transferred on the bus, then the cycle master immediately transmits a cycle start packet, but if there is a packet being currently transferred on the bus, then the cycle master transmits a cycle start packet after the transfer of the packet is completed. Such control is performed in order to keep the period of a cycle substantially fixed. In the cycle start packet, the value of the CYCLE—TIME register when the cycle start packet is transmitted onto the bus is placed. Any other node than the cycle master receives the cycle start packet and overwrites the value of the CYCLE—TIME register of the node with the value placed in the cycle start packet. Consequently, the values of the CYCLE—TIME registers of all nodes connected to the bus are synchronized with the value of the CYCLE—TIME register of the cycle master.
After the cycle start packet is transferred, those nodes which have acquired a band in advance start transmission of an isochronous packet. For transfer of packets, arbitration of the bus is performed after an interval called isochronous gap within which no data transfer is performed is detected, and transmission of the packets is performed in order beginning with a node which has acquired a packet transmission right. After the transfer of all of the isochronous packets for which a band has been acquired is completed, a transfer period for a packet of the best effort type called asynchronous packet is placed for a time after a gap of a long time called sub action gap is detected until a cycle start packet indicative of the start of a next cycle is detected.
It is to be noted that, in an initialization procedure for the bus, a node to which a physical ID of the highest value is allocated is selected as a cycle master.
Meanwhile, an IEEE 1394 bridge (hereinafter referred to as bridge) is investigated wherein a plurality of 1394 buses are connected to each other to perform packet transfer between the different buses. By use of the bridge, increase in scale and in efficiency of a network which employs the IEEE 1394 standard can be achieved. A standardization work is being proceeded by the IEEE P1394.1 Committee.
A basic construction of the bridge is shown in FIG. 3. Referring to FIG. 3, the bridge is basically composed of portals and a switching fabric. A portal is a part at which the bridge is connected to an IEEE 1394 bus, and also the portal itself functions as anode. Meanwhile, a switching fabric is a packet switch for performing packet transfer between portals in the bridge. In FIG. 3, a bridge 10 in which two portals (a portal 20 and another portal 21) and a switching fabric 30 for connecting them to each other are built is shown. However, the number of portals built in one bridge may otherwise be three or more. The portal 20 and the portal 21 are connected to a 1394 bus 40 and another 1394 bus 41, respectively, so that packet transfer can be performed between the buses.
Where isochronous packet transfer between different buses is to be performed using the bridge, it is necessary to synchronize the buses with each other in order to make periods of cycles of all of the buses on a packet transfer route coincide with each other. The IEEE P1394.1 Committee investigates, as a method of establishing synchronism between buses, a method which uses a go—slow command and a go—fast command. Although details of the method are not decided as yet, the concept of the method is such as follows.
Similarly to the existing 1394 standard, even where a network is formed from a plurality of buses using the bridge, a cycle master is determined for each bus and manages synchronization between nodes in the one bus. While, according to the existing IEEE 1394 standard, the CYCLE—TIME register of the cycle master operates in free run, according to the IEEE P1394.1 Committee, synchronism is established between cycle masters to establish synchronism of all nodes on the network. The go—slow command and the go—fast command are used for such establishment of synchronism between cycle masters.
Anode which provides a reference to the time of the entire network, that is, a network cycle master, is selected first. The reference time information of the network cycle master is distributed to all buses on the network by some method. The portal of each bus compares the time information of the network cycle master with time information of the cycle master of the bus, that is, the local cycle master, to which the portal itself is connected. If the comparison reveals that the time of the local cycle master should be delayed, then the portal transmits the go-slow command to the local cycle master, but if it is discriminated that the time of the local cycle master should be advanced, then the portal transmits the go-fast command to the local cycle master. The local cycle master receiving the command transmitted from the portal controls the value of the CYCLE—TIME register thereof in accordance with the command. More particularly, if the go-fast command is received, then the local cycle master increments the value of the cycle—offset field of the CYCLE—TIME register by one, but if the go-slow command is received, then the local cycle master decrements the value of the cycle—offset field by one. By the method described, the periods of cycles of the different buses can be kept equal.
It is to be noted that, since any of the commands must be transferred without any delay for each cycle (after each 125 microseconds), command transfer is performed using the isochronous mode.
In the conventional network synchronization method described above, if an existing 1394 apparatus which does not incorporate the method is connected to the bus and selected as the cycle master, then synchronism cannot be established between the buses. Accordingly, the conventional network synchronization method is disadvantageous in that an existing 1394 apparatus cannot be connected to an IEEE 1394 network constructed using the bridge. The conventional network synchronization method is disadvantageous also in that a resource of isochronous transfer is consumed for establishment of synchronism.